<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>
<%@ include file="/WEB-INF/views/admin/app_base.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <meta name="format-detection" content="telephone=no" />
    <meta content="email=no" name="format-detection" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="<%=basePath%>/static/admin/app/css/iscroll.css">
    <%@ include file="/WEB-INF/views/admin/app_js_css.jsp"%>
    <script rel="script" src="<%=basePath%>/static/admin/app/js/footer.js"></script>
    <script rel="script" src="<%=basePath%>/static/admin/app/js/jquery.cookie.js"></script>
    <script rel="script" src="<%=basePath%>/static/admin/app/js/jquery.fakecrop.js"></script>
    <script rel="script" src="<%=basePath%>/static/admin/app/js/order_list.js"></script>
    <title>订单管理</title>
</head>
<body>
<header>
    <div class="header-title">
        <a href="<%=basePath%>/admin/order/0" class="return">代客下单</a>
        <h2>订单列表</h2>
        <a id="showFilter" class="news-a-brn01">
            <i class="iconfont"></i>
        </a>
    </div>
</header>
<form role="form">
    <div class="form-group form-box">
    	<a id="searchBtn" class="icon-search"><i class="iconfont"></i></a>
        <input type="text" class="form-control input-text" id="searchInput" placeholder="订单号、商品名、购买人电话、品类">
        <input id="statusInput" type="hidden" class="form-control" value="678">
        <input id="payInput" type="hidden" class="form-control" value="123">
        <input id="timeInput" type="hidden" class="form-control" value="1">
    </div>
</form>
<!--代码部分begin-->
<div id="wrapper">
	<div id="scroller">
		<div id="scroller-pullDown">
        	  <span id="down-icon" class="icon-double-angle-down pull-down-icon"></span>
        	  <span id="pullDown-msg" class="pull-down-msg">下拉刷新</span>		
        </div>
		<div id="scroller-content">
			<article>
			    <div class="row">
			        <ul class="claim-title-type">
			            <li id="totalCountLi" class="col-xs-6">订单总数：${totalCount}</li>
			            <li class="col-xs-6">
			           		<a id="totalCaogaoLi" href="<%=basePath%>/admin/order-caogao" style="text-decoration:underline;">草稿:${caogaoCount}</a>
			         	</li>
			        </ul>
			    </div>
			    <div class="date-tab-type">
			        <ul class="date-tab-cell">
			            <li style="width:30%;">单号</li>
			            <li style="width:25%;">商品名称</li>
			            <li style="width:25%;">总金额</li>
			            <li style="width:20%;">状态</li>
			        </ul>
			    </div>
			    <div id="detailBoxDiv" class="details-box">
			    	<c:if test="${empty orderList}"><span>您暂时还没有订单,加油哦！！！</span></c:if>
			    	<c:forEach var="order" items="${orderList}">
				        <a href="<%=basePath%>/admin/order/${order.id }/details" class="details-link">
				            <ul class="details-list-image">
				                <li style="width:30%;">
				                	<div class="new-ad-img new-p-re">
						                <img id="picMainImage" style="margin: 0 auto;" src="${order.picMain }" width="120" height="75"/>
						                <span>${order.id }</span>
				                	</div>
			               		</li>
				                <li style="width:25%;">${order.productName }</br>${order.spec }</li>
				                <li style="width:25%;">￥${order.price }  X  ${order.num }</br><font color="red">总：</font>￥${order.totalAmount }</li>
				                <li style="width:20%;"><font color="red">${order.statusName }</font></br>${order.buyerName }</li>
				            </ul>
				        </a>
			    	</c:forEach>
			    </div>
			    <div class="info-con">
			        <h2 class="info-title">总计：</h2>
			        <ul>
			            <li>
			                <span>订单总金额：</span>
			                <span id="totalAmountSpan">￥${totalAmount}</span>
			            </li>
			            <li>
			                <span>已支付金额：</span>
			                <span id="payAmountSpan">￥${payAmount}</span>
			            </li>
			            <li>
			                <span>待支付金额：</span>
			                <span id="noPayAmountSpan">￥${noPayAmount}</span>
			            </li>
			        </ul>
			    </div>
			</article>
	    </div>
	    <div id="scroller-pullUp">
			<span id="up-icon" class="icon-double-angle-up pull-up-icon"></span>
		    <span id="pullUp-msg" class="pull-up-msg">上拉加载更多</span>
        </div>
	</div>
</div>
<%-- <div>
	<a href="<%=basePath%>/admin/order/0" class="add-btn"><i class="iconfont"></i>新增</a>
</div> --%>
<div id="filterBlock2" class="selectR" style="display:none;">
    <header>
        <div class="header-title01">
            <h2>筛选</h2>
        </div>
    </header>
    <section class="menu-section">
        <h3 class="menu-section-title">
        	状态
        	<li>
                <a id="status_678" class="on">
                    <span>全部</span>
                    <i class="iconfont"></i>
                </a>
            </li>
        </h3>
        <ul class="menu-section-list">
            <li>
                <a id="status_1">
                    <span>新建</span>
                    <i class="iconfont"></i>
                </a>
            </li>
            <li>
                <a id="status_2">
                    <span>备货中</span>
                    <i class="iconfont"></i>
                </a>
            </li>
            <li>
                <a id="status_3">
                    <span>待发货</span>
                    <i class="iconfont"></i>
                </a>
            </li>
            <li>
                <a id="status_4">
                    <span>待收货</span>
                    <i class="iconfont"></i>
                </a>
            </li>
            <li>
                <a id="status_5">
                    <span>已完成</span>
                    <i class="iconfont"></i>
                </a>
            </li>
        </ul>
    </section>
    <section class="menu-section">
        <h3 class="menu-section-title">
        	支付状态
        	<li>
                <a id="pay_123" class="on">
                    <span>全部</span>
                    <i class="iconfont"></i>
                </a>
            </li>
       	</h3>
        <ul class="menu-section-list">
            <li>
                <a id="pay_0">
                    <span>未支付</span>
                    <i class="iconfont"></i>
                </a>
            </li>
            <li>
                <a id="pay_1">
                    <span>支付中</span>
                    <i class="iconfont"></i>
                </a>
            </li>
            <li>
                <a id="pay_2">
                    <span>已支付</span>
                    <i class="iconfont"></i>
                </a>
            </li>
        </ul>
    </section>
    <section class="menu-section">
        <h3 class="menu-section-title">
        	时间
        	<li>
                <a id="time_123">
                    <span>全部</span>
                    <i class="iconfont"></i>
                </a>
            </li>
       	</h3>
        <ul class="menu-section-list">
            <li>
                <a id="time_1" class="on">
                    <span>最近一个月</span>
                    <i class="iconfont"></i>
                </a>
            </li>
            <li>
                <a id="time_3">
                    <span>最近三个月</span>
                    <i class="iconfont"></i>
                </a>
            </li>
        </ul>
    </section>
</div>
<footer>
    <%@ include file="footer.jsp" %>
</footer>
<a id="hideFilter" class="new-btn-slid"><i class="iconfont"></i></a>
<div id="filterBlock1" class="master"></div>
</body>
	<script src="<%=basePath%>/static/admin/app/js/iscroll.js"></script>
	<script src="<%=basePath%>/static/admin/app/js/loading.js"></script>
</html>